<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数的2种写法</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        {{msg}}<br/>{{count}}
        <button @click="changeCount">+</button>
        <button @click="changeCount1">-</button>
    </div>
</body>
</html>
<script>
    new Vue({
        el:"#app",
        data:{
            msg:"hello Vue!",
            count:1
        },
        methods: { 
            changeCount:function(){
                this.count++;
            },
            changeCount1(){
                this.count--;
            }
        },
    });
</script>